export function getSalseHotelNames (options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/names',
    data: {
      pageNum: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      city: options.city || null,
      searchKey: options.searchKey || null
    }
  })
}

export function getSaleHotelAll (options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/allhotel',
    data: {
      pageNum: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      city: options.city || null,
      searchKey: options.searchKey || null,
      status: options.status
    }
  })
}

export function addSaleHotel (options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/add',
    data: {
      pageNo: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      hotelIds: options.hotelIds || null,
      status: options.status
    }
  })
}

export function getSaleHotelList (options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/list',
    data: {
      pageNum: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      searchKey: options.searchKey || null,
      city: options.city || null,
      status: options.statusSelect
    }
  })
}

export function setSaleHotelState (options) {
  return window.fetch({
    method: 'POST',
    url: '/salehotel/enable/toggle',
    data: {
      pageNo: options.pageNum || 1,
      pageSize: options.pageSize || 10,
      status: options.statusBtn,
      saleHotelIds: options.saleHotelIds || null
    }
  })
}
